package cn.xp.fegin;

import cn.xp.domain.Floor;
import cn.xp.dto.FloorDeviceDto;
import cn.xp.util.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "floor-service")
public interface FloorFeignClient {

    @PostMapping("/floor/floorAdd")
    public JSONResult<Floor> floorAdd(@RequestBody Floor floor);

    @GetMapping("/floor/floorType/{id}")
    public List<FloorDeviceDto> floorType(@PathVariable("id") Long id);

}
